#include<cmath>
#include<cstdio>
#include<string>
#include<cstring>
#include<iostream>
#include<algorithm>
#define re register int
using namespace std;
inline int read(){
	int x=0,w=1;
	char ch=getchar();
	while(ch!='-'&&(ch<'0'||ch>'9')) ch=getchar();
	if(ch=='-') w=-1,ch=getchar();
	while(ch>='0'&&ch<='9') x=(x<<1)+(x<<3)+ch-48,ch=getchar();
	return x*w;
}using namespace std;
int main(){
    long long n,m,a;
    n=read();m=read();a=read();
    if(n%a==0) n/=a;
    else n=n/a+1;
    if(m%a==0) m/=a;
    else m=m/a+1;
    cout<<n*m<<endl;
    return 0;
}